package com.breakfast.fun.util;

import com.breakfast.fun.data.entity.home.City;
import com.breakfast.fun.data.entity.home.Home;
import com.breakfast.fun.data.entity.home.Version;
import com.breakfast.fun.data.entity.home.cart.SendTime;
import com.breakfast.fun.data.entity.home.product.ProductComment;
import com.breakfast.fun.data.entity.home.product.ProductDetail;
import com.breakfast.fun.data.entity.home.product.ProductState;
import com.breakfast.fun.data.entity.mall.Abroad;
import com.breakfast.fun.data.entity.mall.MallBanner;
import com.breakfast.fun.data.entity.mall.MallOrder;
import com.breakfast.fun.data.entity.mall.MallOrderDetail;
import com.breakfast.fun.data.entity.user.Login;
import com.breakfast.fun.data.entity.user.Result;
import com.breakfast.fun.data.entity.user.User;
import com.breakfast.fun.data.entity.user.address.Address;
import com.breakfast.fun.data.entity.user.address.Building;
import com.breakfast.fun.data.entity.user.address.Road;
import com.breakfast.fun.data.entity.user.coupon.Coupon;
import com.breakfast.fun.data.entity.user.feedback.Feed;
import com.breakfast.fun.data.entity.user.help.Help;
import com.breakfast.fun.data.entity.user.invite.Invite;
import com.breakfast.fun.data.entity.user.order.Order;
import com.breakfast.fun.data.entity.user.order.OrderDetail;
import com.breakfast.fun.data.entity.user.recharge.PayBean;
import com.breakfast.fun.data.entity.user.recharge.RechargeMoney;
import com.breakfast.fun.data.entity.user.recharge.RechargeRecord;
import com.breakfast.fun.data.entity.user.submit.OrderInfo;

import java.util.Map;

import okhttp3.RequestBody;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.PartMap;
import retrofit2.http.Query;
import rx.Observable;

/**
 * Created by Administrator on 2016/3/23.
 */
public interface ApiService {

    @FormUrlEncoded
    @POST("mobile/2.0/index")
    Observable<Home> getHomeModel(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("mobile/city")
    Observable<City> getCityModel(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("mobile/user")
    Observable<User> getUserModel(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("mobile/user")
    Observable<Login> getLoginModel(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("mobile/user")
    Observable<Result> getLoginCodeModel(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("pay/payBean")
    Observable<RechargeMoney> getRechargeMoneyModel(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("m/referee/progress")
    Observable<Invite> getInviteModel(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("m/referee/hurry")
    Observable<Result> getRemindModel(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("mobile/user/order")
    Observable<Order> getOrderModel(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("mobile/product")
    Observable<ProductState> getProductStateModel(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("mobile/product")
    Observable<ProductDetail> getProductDetailModel(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("mobile/user/address")
    Observable<Address> getAddressModel(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("mobile/system")
    Observable<Feed> getFeedModel(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("m/fqa/list")
    Observable<Help> getHelpModel(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("mobile/recharge")
    Observable<RechargeRecord> getRechargeRecordModel(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("m/referee/code")
    Observable<Result> getRecommendCodeModel(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("mobile/prepaid")
    Observable<Result> getRechargeCardModel(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("/mobile/exchangeCode")
    Observable<Result> getExchangeCodeModel(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("mobile/builder")
    Observable<Building> getBuildingModel(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("mobile/area")
    Observable<Road> getRoadModel(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("mobile/user/address")
    Observable<Result> getModifyAddressModel(@FieldMap Map<String, String> map);

    @Multipart
    @POST("mobile/user?action=photo")
    Observable<User> getUploadPhotoModel(@PartMap Map<String, RequestBody> map);

    @FormUrlEncoded
    @POST("mobile/user")
    Observable<User> getSaveUserInfoModel(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("mobile/user")
    Observable<Result> getModifyPwdModel(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("m/resource/sendTime")
    Observable<SendTime> getSendTimeModel(@FieldMap Map<String, String> map);


    @FormUrlEncoded
    @POST("mobile/user/order")
    Observable<OrderInfo> getSubmitOrderModel(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("mobile/builder")
    Observable<Building> getSearchBuildingModel(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("pay/payBean")
    Observable<RechargeMoney> getPayBeanModel(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("pay/CUP/callback")
    Observable<Result> verifyModel(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("mobile/user/order")
    Observable<Result> getPayForBalanceModel(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("mobile/user/order")
    Observable<Result> getAddCommentModel(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("mobile/2.0/goods/order")
    Observable<Result> getAddMallCommentModel(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("mobile/user/order")
    Observable<OrderDetail> getOrderInfoModel(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("m/order/cancel")
    Observable<Result> getOrderCancelModel(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("mobile/2.0/goods/order")
    Observable<Result> getMallOrderCancelModel(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("mobile/user/order")
    Observable<Result> getOrderFeedBackModel(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("mobile/user")
    Observable<Result> getCodeModel(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("mobile/user")
    Observable<Result> getResetPwdModel(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("mobile/product")
    Observable<ProductComment> getProductCommentModel(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("mobile/2.0/goods")
    Observable<Abroad> getToolModel(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("mobile/2.0/goods")
    Observable<Abroad> getAbroadModel(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("mobile/2.0/goods")
    Observable<ProductComment> getGoodCommentModel(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("mobile/2.0/goods/order")
    Observable<OrderInfo> getSubmitMallModel(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("mobile/2.0/goods/order")
    Observable<MallOrder> getMallOrderModel(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("mobile/2.0/goods/order")
    Observable<MallOrderDetail> getMallOrderDetailModel(@FieldMap Map<String, String> map);


    @FormUrlEncoded
    @POST("mobile/system")
    Observable<Version> getVersionModel(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("shop")
    Observable<MallBanner> getMallBannerModel(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("/m/Coupon/noTimeOutCoupon")
    Observable<Coupon> getCouponModel(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("/m/Coupon/timeOutCoupon")
    Observable<Coupon> getCouponTimeOutModel(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("m/Coupon/couponCount")
    Observable<Result> getCouponCountModel(@FieldMap Map<String, String> map);


    @FormUrlEncoded
    @POST("/m/order/unpayCount")
    Observable<Result> getUnPayCountModel(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("m/Coupon/registerGift")
    Observable<Coupon> getGiftModel(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("m/redEnvelopes/addEnvelopes")
    Observable<Result> getCouponShare(@FieldMap Map<String, String> map);

}
